#include "useful.h"

void copyStandardModelData(QStandardItemModel *source, QStandardItemModel *destination){
    int cols;
    int rows;
    QModelIndex index;
    rows = source ->rowCount();
    cols = source ->columnCount();
    destination->removeRows(0,rows);
    destination ->setRowCount(rows);
    for(int i=0;i<=rows;i++){
        for(int j=1;j<=cols;j++){
            index = source->index(rows,cols);
            //destination->setData(index,QVariant(source->item(rows,cols)));
            destination->setItem(rows,cols,source->itemFromIndex(index));
        }
    }

}
